import java.util.Arrays;

public class Leet492 {
    public static void main(String[] args) {
        Leet492 l = new Leet492();
        System.out.println(Arrays.toString(l.constructRectangle(4)));
    }
    public int[] constructRectangle(int area) {
        int width = (int) Math.sqrt(area);
        int height = width;
        while (height>0){
            while (width*height<area){
                width++;
            }
            if (height*width==area)
                return new int[]{width,height};
            height--;
        }
        return new int[]{};
    }
}
